//
//  NCCameraManager.h
//  Camera
//
//  Created by Neusoft on 11-7-15.
//  Copyright 2011 Neusoft. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "RCBaseVC.h"

@class LVTravelAlbumPickerAlbum;

@protocol NCCameraManagerDelegate <NSObject>

@optional

// Return the image
- (void)returnImage:(UIImage*)image;
- (void)returnImage:(UIImage *)image withInfo:(NSDictionary*)info;

// Return the err
- (void)returnError:(NSString*)errString;

// Cancel
- (void)cancelCamera;


// time to back
- (void) scheduleBack;

@end

@class CLLocation;
@interface NCCameraManager : NSObject <UIImagePickerControllerDelegate, UINavigationControllerDelegate,UIScrollViewDelegate,UIGestureRecognizerDelegate,UIAlertViewDelegate>
{
	// Remember whether can edit the image
	BOOL _allowsImageEditing;
	
	// Hole parent view controller
	UIViewController *_parentViewController;
	
	// Hold the delegate
	id <NCCameraManagerDelegate> _delegate;
    
    UIImagePickerController *_picker;
    
    //UIScrollView *_scrollView;
    
    NSDictionary* _info;
    
    //Page control(Not own)
    UIScrollView *_pageScrollView;
    UIPageControl *_pageControl;
    
    //UIImageView *_imageView;
    UIImage *_image;
    //not own
    UIImage * _originalImage;
    
    NSArray *_nameArray;
    
    UIImageView *_borderImage;
    
    
    UIImageView *_topImage;
    UIImageView *_bottomImage;
    
    
    
    double     lat;
    double     lng;
    NSString     *photoDate;
    UIButton     *_takePictureButton;
    
    BOOL _isFromAlbumDetail;
    
}

@property (nonatomic, assign) BOOL allowsImageEditing;
@property (nonatomic, assign) BOOL isFromSelfView;
@property (nonatomic, assign) UIViewController *parentViewController;
@property (nonatomic, assign) id <NCCameraManagerDelegate> delegate;
@property (nonatomic, retain) UIImage *image;

@property (nonatomic, assign) double lat,lng;
@property (nonatomic, retain) NSString     *photoDate;

- (id)initWithParentController:(UIViewController*)viewController isFromSelfView:(BOOL)isFromSelfView;
- (id)initWithParentController:(UIViewController*)viewController isFromSelfView:(BOOL)isFromSelfView isEnableEditImage:(BOOL)isEnableEditImage;
- (BOOL)getCameraPictureFromAlbum:(BOOL)fromAlbum;
- (BOOL)getCameraPictureFromAlbum:(BOOL)fromAlbum withDeviceFrontMode:(BOOL)isFront;
- (void)selectExistingPicture;
+ (BOOL)supportGetPicFromAlbum;
+ (BOOL)supportGetPicFromCamera;
- (void) returnTheImage:(UIImage *)image;



@end

